package com.itheima.config;

@Component
public class JDBCConfig {
    public DruidDataSource getDataSource(){
        @Bean("datasource")
        DruidDataSource ds = new DruidDataSource();
        ds.setDriverClassName("com.mysql.jdbc.Drive");
        ds.setUrl("jdbc:mysql://localhost:3306/spring");
        ds.setUsername("root");
        ds.setPassword("123456");
        return ds;
    }
}
